package com.heyu.cgsd.util;

public class TimeConvertUtils {
    private static final int S = 0;
    private static final int Y = 1;
    private static final int WK = 2;
    private static final int D = 3;
    private static final int H = 4;
    private static final int MIN = 5;
    private static final int MS = 6;
    private static final int US = 7;
    private static final int PS = 8;

    private static double[] c = {1, 31536000, 604800, 86400, 3600, 60, 0.001, 0.000001, 0.000000000001};

    public static double convert(double input, int srcUnit, int desUnit) {
        double result = input * c[srcUnit];

        return result / c[desUnit];
    }
}
